﻿using DataAccess.ObjectOne;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Class_Entity.ObjectTwo;
using System.Data;
namespace BussinessObject.ObjectOne
{
  public class B_News
    {
        D_News ex = new D_News();
         C_News fx = new C_News();
         DataTable tb = new DataTable();
         public C_News LoadNews(int val)
         {
             tb = ex.LoadNews(val);
             foreach (DataRow dr in tb.Rows)
             {
                 fx.TITLE = dr["TITLE"].ToString();
                 fx.CREATE_DATE = dr["CREATE_DATE"].ToString() ;
                 fx.BODY = dr["BODY"].ToString();
                 fx.SUBJECT = dr["SUBJECT"].ToString();                 
             }
             return fx;
         }
    }
}
